home *** CD-ROM | disk | FTP | other *** search
/ Die Speccy' 97 / Die Speccy' 97.iso / amiga_system / the_aminet / comm / bbs / pmbs1251_demo.lha / prometheus / developer / DimBeispiel.c < prev    next >
Text File  |  1995-09-19  |  681b  |  29 lines

  1. Beispiel zur Behandlung von PMBS-Dimfeldern in C
  2. (die Brettliste wird z.B. in DimFeldern verwaltet)
  3.  
  4.       #include <proto/exec.h>
  5.  
  6.       struct DimFeld
  7.       {
  8.         long DimAnzahl;
  9.         void *DimData[0];  // erzeugt ANSI-Portablilitätswarnung !!
  10.       };
  11.  
  12.       struct DimFeld *GetDimFeld(long offset)
  13.       {
  14.         struct MsgPort *PServer;
  15.         struct DimFeld *DimFeld;
  16.  
  17.         PServer=FindPort("rexx_PXServer");
  18.  
  19.         if(PServer)
  20.         {
  21.           DimFeld=(struct DimFeld *) (* ( (ULONG *) ( * ( (ULONG *)
  22.                       ((UBYTE *) PServer + offset ))))) ;
  23.  
  24.           return DimFeld;
  25.         }
  26.         else
  27.           return (struct DimFeld *)0L;
  28.       }
  29.